import numpy as np
import cv2
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore

class VideoWidget(pg.GraphicsLayoutWidget):
    '''
    显示视频图像的控件
    '''
    def __init__(self):
        super().__init__()
        self.view=self.addViewBox()
        self.img=pg.ImageItem()
        self.view.setAspectLocked(True)
        self.view.addItem(self.img)

    def Update(self,mat):
        '''
        更新图片
        :param matrix:
        :return:
        '''
        self.img.setImage(mat)



